// $codepro.audit.disable
/**
 * Test for solarsystem
 */
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertEquals;
import org.junit.Test;

/**
 * @author Guozhu Zheng
 * @version $Revision: 1.0 $
 */

public class SolarSystemTest {
		
	/**
	 * Method toString.
	 * @return String
	 */
	@Override
	public String toString() {
		return "SolarSystemTest []";
	}

	/**
	 * Method test0.
	 */
	@Test
	public void test0(){
		new GameInfo();
		final SolarSystem solar = new SolarSystem("SuperSolarSystem", 33, 44);
		assertTrue(solar.toString().contains(solar.getName()));
	}

	/**
	 * Method test1.
	 */
	@Test
	public void test1(){
		new GameInfo();
		final SolarSystem solar = new SolarSystem("SuperSolarSystem", 33, 44);
		assertTrue(solar.toString().contains(solar.getPlanets().toString()));
	}
	
	/**
	 * Method test2.
	 */
	@Test
	public void test2(){
		new GameInfo();
		final SolarSystem solar = new SolarSystem("SuperSolarSystem", 33, 44);
		assertTrue(solar.toString().contains(", x=" + solar.getX()));
	}
	
	/**
	 * Method test3.
	 */
	@Test
	public void test3(){
		new GameInfo();
		final SolarSystem solar = new SolarSystem("SuperSolarSystem", 33, 44);
		solar.setResource(SolarSystem.RESOURCENAME[0], 100);
		assertEquals(solar.getResource(SolarSystem.RESOURCENAME[0]), 100);
	}
	
}
